Resource URL: /platform/<<version=1>>/sync/target/policies/<POLICY>

    Overview: This resource applies the standard collection pattern to
              individual sync target policies (sync policies on other clusters
              that target this cluster).

     Methods: GET, DELETE

********************************************************************************

Method GET: View a single SyncIQ target policy.

       URL: GET /platform/<<version=1>>/sync/target/policies/<POLICY>

There are no query arguments for this method.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "policies": {
      "items": {
        "type": "object", 
        "properties": {
          "name": {
            "required": true, 
            "type": "string", 
            "description": "User-assigned name of this sync policy."
          }, 
          "source_cluster_guid": {
            "required": true, 
            "type": "string", 
            "description": "Unique identifier for the source cluster."
          }, 
          "last_job_state": {
            "enum": [
              "scheduled", 
              "running", 
              "paused", 
              "finished", 
              "failed", 
              "canceled", 
              "needs_attention", 
              "skipped", 
              "pending", 
              "unknown"
            ], 
            "type": "string", 
            "description": "The state of the last job run for this policy.", 
            "required": true
          }, 
          "id": {
            "required": true, 
            "type": "string", 
            "description": "The system ID given to this sync policy."
          }, 
          "target_path": {
            "required": true, 
            "type": "string", 
            "description": "Absolute filesystem path on the target cluster for the sync destination."
          }, 
          "legacy_policy": {
            "required": true, 
            "type": "boolean", 
            "description": "Was this policy defined by a OneFS version earlier than 6.0? (Pre-6.0 policies did not have the target policy concept and canceling from the target side will not be available.)"
          }, 
          "source_host": {
            "required": true, 
            "type": "string", 
            "description": "Hostname or IP address of sync source cluster."
          }, 
          "last_update_from_source": {
            "required": true, 
            "type": [
              "integer", 
              "null"
            ], 
            "description": "The last time this cluster was updated with sync information from the source cluster for this policy, in unix epoch seconds.  Null if no such update has occurred yet."
          }, 
          "last_source_coordinator_ip": {
            "required": true, 
            "type": "string", 
            "description": "The IP address from which a SyncIQ coordinator daemon most recently connected to this cluster to update it about the progress of a job for this policy."
          }, 
          "failover_failback_state": {
            "enum": [
              "writes_disabled", 
              "enabling_writes", 
              "writes_enabled", 
              "disabling_writes", 
              "creating_resync_policy", 
              "resync_policy_created"
            ], 
            "type": "string", 
            "description": "The condition of this policy with respect to sync failover/failback.", 
            "required": true
          }
        }
      }, 
      "type": "array"
    }, 
    "resume": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
    }
  }
}

********************************************************************************

Method DELETE: Break the target association with this cluster for this policy.

          URL: DELETE /platform/<<version=1>>/sync/target/policies/<POLICY>

Query arguments:
force=<boolean> Ignore any running jobs when preparing to delete the policy
                target association.

There is no response body for this method.
